Skip to content

Comments

Add domain to ENR and correct checking#164

Merged
jking-aus merged 1 commit intosigp:unstablefrom
dknopik:fix-domain-in-enr
Mar 4, 2025
Merged

Add domain to ENR and correct checking#164
jking-aus merged 1 commit intosigp:unstablefrom
dknopik:fix-domain-in-enr

Conversation

@dknopik
Copy link
Member

@dknopik dknopik commented Feb 28, 2025

  1. Put our domaintype into the ENR so that we can be discovered
  2. The domaintype is stored as four bytes, not as string. Fixes parsing

);
false
}
if let Some(Ok(domain_type)) = enr.get_decodable::<[u8; 4]>("domaintype") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we handle the else case?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean? There is an else below. If the field can not decoded, the enr is not acceptable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I should have been clearer. We don't log if there's an error when decoding.

It was like that before but we also don't log if the field doesn't exist. Maybe we should if it's expected to always exist at this point.

Copy link
Member Author

@dknopik dknopik Mar 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not expected to always exist. For example, non-SSV ENRs might arrive at this point, and they won't have this field. I will add a trace log for debugging anyway. Thanks!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right!

@jking-aus jking-aus merged commit 7e66345 into sigp:unstable Mar 4, 2025
10 checks passed
@dknopik dknopik mentioned this pull request Mar 4, 2025
@dknopik dknopik deleted the fix-domain-in-enr branch March 4, 2025 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants